package com.ziyun.erp.modules.goods.dao;

import com.ziyun.erp.modules.goods.entity.GoodsOptionEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 属性选项表
 * 
 * @author xueqz
 * @email 
 * @date 2018-08-20 09:57:04
 */
@Service("goodsOptionDao")
public interface GoodsOptionDao extends BaseMapper<GoodsOptionEntity> {

    void flagDeleteByOptionId(@Param("optionId") Long optionId);

    List<GoodsOptionEntity> selectByOptionIds(@Param("optionIds") String optionIds);

    List<GoodsOptionEntity> selectByCraftOptionIds(@Param("craftOptionIds")String craftOptionIds);

    Integer getCounterPrice(@Param("optionIds") String optionIds);

    GoodsOptionEntity getCounterPriceNew(@Param("optionIds") String optionIds,@Param("goodsId")Long goodsId);

    void updateValues(GoodsOptionEntity goodsOption);

    List<GoodsOptionEntity> getSelectedOptions(@Param("goodsId") Long goodsId, @Param("attributeId") Long attributeId);

    List<GoodsOptionEntity> getSelectedCraftOptions(@Param("goodsId") Long goodsId, @Param("attributeId")Long attributeId);

    List<GoodsOptionEntity> loadTempOptionsByAttributeId(@Param("attributeId") Long attributeId);

    String getOptionNamesByOptionIds(@Param("options") String options);

    String selectByAttributeId(@Param("attributeId") Object attributeId);

    List<GoodsOptionEntity> selectPrivateOption(@Param("attributeId") Long attributeId, @Param("sellerId") Integer sellerId);
}
